package io.bdmc.modules.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import lombok.Data;
import lombok.EqualsAndHashCode;

import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author HuangLu
 * @since 2019-02-15
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class SysValidate extends Model<SysValidate> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "validate_id", type = IdType.AUTO)
    private Long validateId;

    /**
     * 手机号
     */
    private String mobile;

    /**
     * 验证码
     */
    private String validateCode;

    /**
     * 开始时间
     */
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    private LocalDateTime endTime;

    /**
     * 发送时间
     */
    private LocalDateTime sendTime;

    /**
     * 目的
     */
    private Integer purpose;

    /**
     * 是否已用
     */
    private Boolean isUsed;


    @Override
    protected Serializable pkVal() {
        return this.validateId;
    }

    @Override
    public String toString() {
        return "SysValidate{" +
        "validateId=" + validateId +
        ", mobile=" + mobile +
        ", validateCode=" + validateCode +
        ", startTime=" + startTime +
        ", endTime=" + endTime +
        ", sendTime=" + sendTime +
        ", purpose=" + purpose +
        ", isUsed=" + isUsed +
        "}";
    }
}
